home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cl_7_bug.zip / BUG_5.C < prev    next >
C/C++ Source or Header  |  1992-10-07  |  713b  |  22 lines

  1. /*
  2.   Tests programs with #pragmas can't be compiled without /Oi switch.
  3.   I like to put a pragma around some code for testing purposes.
  4.   But now I can't compile without optimizing for example codeview
  5.   without removing theese pragmas.
  6.   The actual problem is because intrisinic strlen() can't be trusted,
  7.   I'd like to put "#pragma function (strlen)" in my header file but I can't
  8.   do it if I should want to sometimes compile without optimizing (to find
  9.   more buggs).
  10.  */
  11.  
  12. #include <stdio.h>
  13.  
  14. #pragma function (strlen)    /* This dosent work without /Oi */
  15. #pragma intrinsic (strlen)    /* This dosent work without /Oi */
  16.  
  17. int main(int argc,char *argv[])
  18. {
  19.   puts("I am alive");
  20.   return(0);
  21. }
  22.